package com.taiji.order;
/*
 * Copyright (C) 2020  FunGuide, Inc. All Rights Reserved.
 */


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * Simple to Introduction
 * className: EurekaApplication
 *
 * @author yanxw
 * @version 2020/2/29 15:12
 */
//激活hystrix
@EnableCircuitBreaker
@SpringBootApplication
@EnableFeignClients
@EnableHystrixDashboard
public class OrderApplication {

    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }
}

